﻿using System.Collections.Generic;
using yiCommerce.Controllers;
using yiCommerce.Core.Domain.Products;

namespace yiCommerce.Models.Products
{
    public class ProductDetailsModel
    {
        public int Id { get; set; }

        public string Name { get; set; }

        public string ShortDescription { get; set; }

        public string FullDescription { get; set; }

        public PictureModel DefaultPictureModel { get; set; }

        public IList<PictureModel> PictureModels { get; set; }

        public IList<ProductVariantModel> ProductVariantModels { get; set; }

        public IList<ProductSpecificationAttributeModel> SpecificationAttributeModels { get; set; }


        public class ProductVariantModel
        {
            public int Id { get; set; }

            public PictureModel PictureModel { get; set; }

            public int StockQuantity { get; set; }

            public string Description { get; set; }

            public string Sku { get; set; }

            public string Name { get; set; }

            public decimal Price { get; set; }

            public AddToCartModel AddToCart { get; set; }

            public IList<ProductVariantAttributeModel> ProductVariantAttributes { get; set; }

            public class ProductVariantAttributeModel
            {
                public int Id { get; set; }

                public int ProductVariantId { get; set; }

                public int ProductAttributeId { get; set; }

                public string Name { get; set; }

                public string Description { get; set; }

                public AttributeControlType AttributeControlType { get; set; }

                public IList<ProductVariantAttributeValueModel> ProductVariantAttributeValueModels { get; set; }
            }
        }
    }
}